import request from './request'

// 日志相关API接口
export const logApi = {
  // 获取操作日志列表
  getLogs: (params: {
    page?: number
    size?: number
    username?: string
    operationType?: string
    startTime?: string
    endTime?: string
  }) => {
    return request.get('/api/logs', { params })
  },

  // 删除所有日志
  deleteAllLogs: () => {
    return request.delete('/api/logs')
  },

  // 根据ID删除日志
  deleteLog: (id: number) => {
    return request.delete(`/api/logs/${id}`)
  }
}